#include <iostream>
#include <string>

using namespace std;

int main()
{
    string str, res, temp;
    cin >> str;
    for(size_t i = 0 ; i < str.size(); ++i){
        if(str[i] >= '0' && str[i] <= '9')
            temp += str[i];
        else{
            if(res.length() < temp.size())
                res = temp;
            temp = ""; 
        }
    }
    if(res.length() < temp.size())
        res = temp;
    cout << res;
    return 0;
}
